package cn.jhz.learn.blog.test.core;

import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import cn.jhz.learn.blog.common.bean.JsonData;

@RestController
@RequestMapping("/{blog_id}/essay")
public class EssayController {
	
	@PostMapping
	public JsonData submitEssay(@PathVariable("blog_id") String blogId) {
		//TODO:待设计VO
		return JsonData.success();
	}
	
	@DeleteMapping("/{essay_id}")
	public JsonData removeEssay(@PathVariable("blog_id") String blogId, @PathVariable("essay_id") Integer essayId) {
		//TODO:待设计VO
		return JsonData.success();
	}
	
	@PutMapping
	public JsonData modifyEssay(@PathVariable("blog_id") String blogId) {
		//TODO:待设计VO
		return JsonData.success();
	}
	
	@GetMapping("/{essay_id}")
	public JsonData findEssay(@PathVariable("blog_id") String blogId, @PathVariable("essay_id") Integer essayId) {
		//TODO:待设计VO
		return JsonData.success();
	}
}
